package com.edu.zju.scs.panacea.entity.plan;

import java.util.Date;
import java.util.List;

/**
 * @Author: Yue Liang
 * @Date: 2018-12-26 20:32
 */
public class Plan {
    /**
     * 计划自增ID
     */
    private Long id;

    /**
     *
     */
    private Long industryId;

    /**
     * 广告类型。 0：图片 1：视频 2：html
     */
    private Integer type;

    /**
     * 计划名称
     */
    private String name;

    /**
     * 卖家ID
     */
    private Long sellerId;

    /**
     * 广告投放的资源位ID
     */
    private List<String> locIds;

    /**
     * 广告投放的资源包ID
     */
    private List<String> packageIds;

    /**
     * 广告开始日期
     */
    private Date startDate;

    /**
     * 广告结束日期
     */
    private Date endDate;

    /**
     * 广告投放时间
     */
    private List<Integer> launchTime;


    /**
     * 广告的状态。0：已提交，未审核； 1：审核成功； 2：审核失败
     */
    private Integer state;

    /**
     * 备注，主要用于说明失败原因
     */
    private String remark;

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<String> getLocIds() {
        return locIds;
    }

    public void setLocIds(List<String> locIds) {
        this.locIds = locIds;
    }

    public List<String> getPackageIds() {
        return packageIds;
    }

    public void setPackageIds(List<String> packageIds) {
        this.packageIds = packageIds;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Long getSellerId() {
        return sellerId;
    }

    public void setSellerId(Long sellerId) {
        this.sellerId = sellerId;
    }

    public Long getIndustryId() {
        return industryId;
    }

    public void setIndustryId(Long industryId) {
        this.industryId = industryId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public List<Integer> getLaunchTime() {
        return launchTime;
    }

    public String getBinLaunchTime() {
        String launchTime = "";
        for (int i = 0; i < 24; i++) {
            if (this.launchTime.contains(i)) {
                launchTime += "1";
            } else {
                launchTime += "0";
            }
        }
        return launchTime;
    }

    public void setLaunchTime(List<Integer> launchTime) {
        this.launchTime = launchTime;
    }
}
